package cn.gson.crm.model.mapper;

import cn.gson.crm.model.pojos.*;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RepairOrderMapper {
    //查询当前登录人维修工单的
    public List<RepairOrder> selectrep(Integer rid);
    //查询当前人下所有客户
    public List<Customer> selectcustomer(Integer yid);
    //多条件查询维修记录
    public List<RepairOrder> selectwhere(@Param("rid") Integer rid,@Param("where") String where);
    //时间查询维修记录
    public List<RepairOrder> selecttime(@Param("rid") Integer rid,@Param("statr") String statr,@Param("endtime") String endtime);
    //根据客户id查询此客户下所有订单
    public List<Order> selectorder(Integer cid);
    //根据订单id查询订单详情
    public List<OrderDetails> selectodte(Integer odeid);
    //新增客户签约人下拉框
    public List<Linkman> selectqyr(@Param("cid") Integer cid);
    //维修总工单
    public List<RepairOrder> selectjiance(Integer rid);
    public List<RepairOrder> selectgoutong(Integer rid);
    public List<RepairOrder> selectqrweix(Integer rid);
    public List<RepairOrder> selectweixiu(Integer rid);
    public List<RepairOrder> selectjiaofu(Integer rid);
    public List<RepairOrder> selectdaiweix(Integer rid);
    public List<RepairOrder> selectweishouk(Integer rid);
    //修改维修进度
    public void updatestate(@Param("state") String state,@Param("rid") Integer rid);
    //修改此工单是否维修过状态
    public void updatweifou(@Param("rid") Integer rid);
    //详情
    public List<RepairOrderDetails> selectxian(Integer rid);
    public List<RepairOrder> selectnian(@Param("rid") Integer rid,@Param("nian") String nian);
    //查询采购和维修过后的退换记录
    public List<Purchase> selectcaigou();
    public List<RepairOrder> selectweixiut();
    //根据主表id查询采购详情
    public List<Purchasexq> selectcaixiang(Integer cid);
    //修改采购入库状态和维修入库状态
    public void updatecaig(Integer cid);
    public void updateweixx(@Param("rukufou") String rukufou,@Param("rid") Integer rid);
}
